//
//  SportsModel.m
//  侠客行
//
//  Created by laibingqiang on 16/11/8.
//  Copyright © 2016年 laibingqiang. All rights reserved.
//

#import "SportsModel.h"

@implementation SportsModel

- (instancetype)initWithType:(XkxSportType)type
{
    if (self = [super init]) {
        
        _type = type;
    }
    
    return self;
}

- (UIImage *)image
{
    if(_image != nil)
    {
        return _image;
    }
    UIImage *img;
    
    switch (_type) {
        case XkxSportTypeRun:
            
            img = [UIImage imageNamed:@"map_annotation_run"];
            break;
        case XkxSportTypeWalk:
            img = [UIImage imageNamed:@"map_annotation_walk"];
            break;
            
        case XkxSportTypeBike:
            
            img = [UIImage imageNamed:@"map_annotation_bike"];
            break;
            
        default:
            break;
    }
    
    return  img;
}
@end
